﻿using System.ComponentModel.DataAnnotations;

namespace GioHangViet.Models
{
    [Table("CategoryProduct")]
    public class CategoryProduct
    {
        [Key, Column(Order = 0)]
        [Required(ErrorMessageResourceName = "ErrorProductId", ErrorMessageResourceType = typeof(Resources.Error))]
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayProductId")]
        public int ProductId { get; set; }

        [Key, Column(Order = 1)]
        [Required(ErrorMessageResourceName = "ErrorCategoryAlias", ErrorMessageResourceType = typeof(Resources.Error))]
        [StringLength(200, ErrorMessageResourceName = "ErrorCategoryAliasLength", ErrorMessageResourceType = typeof(Resources.Error))]
        [Display(ResourceType = typeof(Resources.Displaies), Name = "DisplayCategoryId")]
        public string CategoryAlias { get; set; }

    }
}